﻿<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTagBox-2#virtual-scrolling">
<CodeSnippetTabPage Text="Razor">
@(@"<DxTagBox Data=""@Data""
          ListRenderMode=""ListRenderMode.Virtual""
          TextFieldName=""@nameof(Country.CountryName)""
          ClearButtonDisplayMode=""DataEditorClearButtonDisplayMode.Auto""
          @bind-Values=""@Values"">
</DxTagBox>

@code {
    IEnumerable<Country> Data { get; set; }
    IEnumerable<Country> Values { get; set; }

    protected override async Task OnInitializedAsync() {
        Data = await CountryNamesService.LoadAsync();
        Values = new List<Country>() { Data.First() };
    }
}")
</CodeSnippetTabPage>
<CodeSnippetTabPage Text="Country">
@(@"public class Country {
    public int Id { get; set; }
    public string CountryName { get; set; }
}")
</CodeSnippetTabPage>
</CodeSnippetTabbed>
